import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        int count=0;
        for (int i = 1; i <= 100; i++) {
            if(i%10==9&&i/10==9){
                count+=2;
            }
            else if(i%10==9||i/10==9){
                count++;
            }
        }
        System.out.println(count);
    }
    public static void main3(String[] args) {
        for (int i = 1000; i <= 2000; i++) {
            if((i%4==0&&i%100!=0)||i%400==0)
                System.out.println(i+"是闰年");
        }
    }
    public static void main2(String[] args) {
        System.out.println("请输入一个数");
        int a=new Scanner(System.in).nextInt();
        for (int i = 2; i <=a; i++) {
           boolean isPrime = true;
            for (int k = 2; k <= Math.sqrt(i); k++) {
                if (i % k == 0){
                    isPrime=false;
                    break;
                }
            }
            if(isPrime==true){
                System.out.println(i+"是素数");
            }
        }
    }
    public static void main1(String[] args) {
        System.out.println("请输入一个数");
        int a=new Scanner(System.in).nextInt();
        if(a==2){
            System.out.println("是素数");
            System.exit(0);
        }
            for (int i=2;i<Math.sqrt(a);i++) {
                if (a % i == 0) {
                    System.out.println(("不是素数"));
                    System.exit(0);
                }
            }
        System.out.println("是素数");
    }
}
